package com.hs.demo.service.impl;

import java.util.Date;
import java.util.List;

import com.hs.demo.entity.TbDetectionRl;
import com.hs.demo.mapper.TbDetectionRlMapper;
import com.hs.demo.service.ITbDetectionRlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 实验室光谱检测熔炼质检结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-17
 */
@Service
public class TbDetectionRlServiceImpl implements ITbDetectionRlService
{
    @Autowired
    private TbDetectionRlMapper tbDetectionRlMapper;

    /**
     * 查询实验室光谱检测熔炼质检结果
     * 
     * @param id 实验室光谱检测熔炼质检结果主键
     * @return 实验室光谱检测熔炼质检结果
     */
    @Override
    public TbDetectionRl selectTbDetectionRlById(Long id)
    {
        return tbDetectionRlMapper.selectTbDetectionRlById(id);
    }

    /**
     * 查询实验室光谱检测熔炼质检结果列表
     * 
     * @param tbDetectionRl 实验室光谱检测熔炼质检结果
     * @return 实验室光谱检测熔炼质检结果
     */
    @Override
    public List<TbDetectionRl> selectTbDetectionRlList(TbDetectionRl tbDetectionRl)
    {
        return tbDetectionRlMapper.selectTbDetectionRlList(tbDetectionRl);
    }

    /**
     * 新增实验室光谱检测熔炼质检结果
     * 
     * @param tbDetectionRl 实验室光谱检测熔炼质检结果
     * @return 结果
     */
    @Override
    public int insertTbDetectionRl(TbDetectionRl tbDetectionRl)
    {
        tbDetectionRl.setCreateTime(new Date());
        return tbDetectionRlMapper.insertTbDetectionRl(tbDetectionRl);
    }

    /**
     * 修改实验室光谱检测熔炼质检结果
     * 
     * @param tbDetectionRl 实验室光谱检测熔炼质检结果
     * @return 结果
     */
    @Override
    public int updateTbDetectionRl(TbDetectionRl tbDetectionRl)
    {
        return tbDetectionRlMapper.updateTbDetectionRl(tbDetectionRl);
    }

    /**
     * 批量删除实验室光谱检测熔炼质检结果
     * 
     * @param ids 需要删除的实验室光谱检测熔炼质检结果主键
     * @return 结果
     */
    @Override
    public int deleteTbDetectionRlByIds(Long[] ids)
    {
        return tbDetectionRlMapper.deleteTbDetectionRlByIds(ids);
    }

    /**
     * 删除实验室光谱检测熔炼质检结果信息
     * 
     * @param id 实验室光谱检测熔炼质检结果主键
     * @return 结果
     */
    @Override
    public int deleteTbDetectionRlById(Long id)
    {
        return tbDetectionRlMapper.deleteTbDetectionRlById(id);
    }
}
